<template>
<div class="home">
  <h2>Home Page</h2>
  <h2>
    Counter模块的count:{{$store.state.counter.count}}
  </h2>

  <h2>
    Counter模块的doubleCount:{{$store.getters.doubleCount}}
  </h2>

  <button @click="incrementCount">count模块+1</button>
</div>
</template>

<script setup>
import {useStore} from 'vuex'
const store=useStore()
function incrementCount(){
  store.dispatch('incrementCountAction')
}

</script>

<style scoped>

</style>